using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Script.Services;

namespace TestWidget
{
    /// <summary>
    /// Summary description for TestWebMethod
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    [ScriptService]
    public class TestWebMethod : System.Web.Services.WebService
    {

        [WebMethod]
        [ScriptMethod(UseHttpGet=false,XmlSerializeString=true)]
        public string HelloWorld()
        {
            return "Hello World";
        }

        [WebMethod]
        [ScriptMethod(UseHttpGet = false, XmlSerializeString = true)]
        public string ScriptMethodTest()
        {
            try
            {
                System.IO.File.WriteAllText("c:\\test.text", DateTime.Now.ToLongTimeString());
            }
            catch(Exception ex) { }
            return "FunctionScriptMethodTest";
        }
    }
}
